[clr-android] Add CoreCLR debugger support for Android#10889
Draft
kotlarmilos wants to merge 2 commits intomainfrom
Draft
[clr-android] Add CoreCLR debugger support for Android#10889kotlarmilos wants to merge 2 commits intomainfrom
kotlarmilos wants to merge 2 commits intomainfrom
Conversation
- Introduced targets for setting up and running the CoreCLR remote debugger. - Added conditions to enable CoreCLR debugging based on project properties. - Updated environment variables for CoreCLR profiling. - Implemented tests to verify CoreCLR debugger environment variables and behavior in release builds.
24 tasks
Member
jonathanpeppers
left a comment
There was a problem hiding this comment.
I think one thing that is missing is some kind of end-to-end test. Maybe it can't actually debug, but could a test do something like:
- Build run an app with CoreCLR debugger enabled
- Verify it launches
- Use TcpClient or equivalent to just verify the debugger is listening
I think that would catch a lot of potential bugs.
....Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.Application.targets
Outdated
Show resolved
Hide resolved
...id.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.DefaultProperties.targets
Outdated
Show resolved
Hide resolved
...id.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.DefaultProperties.targets
Outdated
Show resolved
Hide resolved
| public string? AndroidSequencePointsMode { get; set; } | ||
| public bool EnableSGenConcurrent { get; set; } | ||
| public string? CustomBundleConfigFile { get; set; } | ||
| public bool EnableCoreClrDebugger { get; set; } |
Member
There was a problem hiding this comment.
Seems like this could check:
- Is it CoreCLR
- Is the general purpose debugger MSBuild property set
Member
Author
There was a problem hiding this comment.
Do you mean to exclude this property and use CoreCLR + general purpose debugger property?
Member
There was a problem hiding this comment.
You could pass in $(_AndroidRuntime) and the new debugger property, yes.
Thays is about to open a PR similar to this one, you might wait (and/or combine) your changes there.
....Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.Application.targets
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When building a CoreCLR Android app in Debug mode, the build now configures the gRPC-based remote debugger. It sets the profiler environment variables
CORECLR_ENABLE_PROFILING,CORECLR_PROFILER,CORECLR_PROFILER_PATHso CoreCLR loads libremotemscordbitarget.so as a CoreCLR profiler at startup.Tested end-to-end on a Pixel 7a arm64 - profiler loads, gRPC connection establishes over adb, initialize return S_OK, and the host receives the CreateProcess callback.